package com.surveycomp.utils;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import org.apache.geronimo.mail.util.Base64;


public class HashGenerator {
	public static String generateHash(String buffer) {
		try {
			
			return new String(Base64.encode(MessageDigest.getInstance("md5")
					.digest(buffer.toString().getBytes())));
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		}
		return "";
	}
}
